package com.kantboot.io.exception;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class SessionUtilException extends RuntimeException {

    /**
     * 错误时返回的id
     */
    private Integer id;

    /**
     * 错误时返回的信息
     */
    private String message;

    public SessionUtilException(Integer id, String message) {
        super(message);
        setId(id);
        setMessage(message);
    }

    public static SessionUtilException notLoginStateException(){return new SessionUtilException(5555,"非登录状态");}
}
